package com.yunji.cabinet.service;

import com.yunji.cabinet.bo.CabinetCellListQueryBO;
import com.yunji.cabinet.bo.CabinetCellSelectQueryBO;
import com.yunji.cabinet.bo.CabinetCellUpdateBO;
import com.yunji.cabinet.bo.FillCargoBO;
import com.yunji.cabinet.domain.ContainerCell;
import com.yunji.cabinet.vo.CellProductCountVO;

import java.util.List;

/**
 * @version 1.0
 * @Project: yunji-coffee
 * @Package com.yunji.cabinet.service
 * @FileName ICabinetCellService.java
 * @Copyright Copyright © 2024 云集互联. All Rights Reserved
 * Company		com
 * @CreateTime 2024-04-08 20:55:03
 * @Description 货柜格子接口
 * @Modification Author                    History Time			Version				Description
 * --------------------------------------------------------------------------------
 * HuaAo				2024-04-08 20:55:03		1.0					1.0 Version
 * @since JDK 1.8.0_202
 */
public interface ICabinetCellService {
    /**
     * @return boolean 创建结果
     * @Title create
     * @Desc 创建货柜格子
     * @Date 2024-04-09 19:49:14
     * @Param cell 格子信息
     */
    boolean create(ContainerCell cell);

    boolean create(List<ContainerCell> cells);

    /**
     * @return boolean 修改结果
     * @Title update
     * @Desc 修改货柜格子
     * @Date 2024-04-09 19:49:14
     * @Param cell 格子信息
     */
    boolean update(CabinetCellUpdateBO bo);

    /**
     * @return boolean 删除结果
     * @Title delete
     * @Desc 删除格子信息
     * @Date 2024-04-09 19:48:32
     * @Param cell 修改信息
     * @Param ids 过滤条件
     */
    boolean deleteByContainerIds(Long... ids);

    /**
     * @param param 统计参数
     * @Title countCabinetCell
     * @Desc 统计满足条件格子数
     * @Date 2024-09-30 09:51:45.995
     * @Return Integer
     */
    List<ContainerCell> searchCountCell(CabinetCellListQueryBO bo);

    /**
     * @return int 商品数量
     * @Title getRemainProduct
     * @Desc 获取剩下商品数量
     * @Date 2024-04-12 18:11:32
     * @Param containerId 货柜ID
     */
    int getRemainProduct(Long containerId);

    ContainerCell select(CabinetCellSelectQueryBO bo);

    /**
     * @param containerId 货柜ID
     * @param nums        格子序号
     * @Title updateContainerCells
     * @Desc 员工端扫码更新格子信息
     * @Date 2024-06-12 14:14:29.234
     * @Return boolean 更新结果
     */

    List<ContainerCell> searchByContainerId(Long containerId);

    List<FillCargoBO> searchFillCargoCells();

    List<CellProductCountVO> countCellProduct(Long belongId);

    boolean addProduct(Long cabinetId, Integer... nums);

    List<ContainerCell> search(CabinetCellListQueryBO bo);

    void updateBatch(List<ContainerCell> updateList);

    void saveBatch(List<ContainerCell> createList);

    List<ContainerCell> getCellListCache(Long containerId);
}
